Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

feat(rome_js_parser, rome_js_formatter): import attribute #4359

Merged
merged 2 commits into from
Apr 11, 2023

Conversation

ematipico
Copy link
Contributor

@ematipico ematipico commented Apr 7, 2023

Summary

The grammar import "module" assert {} has been changed to import "module" with {}.

Source

This PR applies this change to JS parser and JS formatted.

The Prettier test suite still uses the old grammar, so I moved the folder under our test suite and replaced the keyword.

Test Plan

Updated all the tests

Changelog

  • The PR requires a changelog line

Documentation

  • The PR requires documentation
  • I will create a new PR to update the documentation

@netlify
Copy link

netlify bot commented Apr 7, 2023

Deploy Preview for docs-rometools canceled.

Name Link
🔨 Latest commit 27a774f
🔍 Latest deploy log https://app.netlify.com/sites/docs-rometools/deploys/6434312a6267f7000852c781

@github-actions github-actions bot added A-Formatter Area: formatter A-Parser Area: parser A-Tooling Area: our own build, development, and release tooling labels Apr 7, 2023
@ematipico ematipico force-pushed the feat/import-assertion-change branch from 09e35f8 to 5bb1df7 Compare April 7, 2023 14:11
@ematipico ematipico force-pushed the feat/import-assertion-change branch from 5bb1df7 to 044b0d5 Compare April 7, 2023 14:13
@github-actions
Copy link

github-actions bot commented Apr 7, 2023

Parser conformance results on ubuntu-latest

js/262

Test result main count This PR count Difference
Total 48647 48647 0
Passed 47582 47568 ❌ ⏬ -14
Failed 1065 1079 ❌ ⏫ +14
Panics 0 0 0
Coverage 97.81% 97.78% -0.03%
🔥 Regression (19):
language/import/json-extensibility-array.js
language/import/json-extensibility-object.js
language/import/json-idempotency.js
language/import/json-value-array.js
language/import/json-value-boolean.js
language/import/json-value-null.js
language/import/json-value-number.js
language/import/json-value-object.js
language/import/json-value-string.js
language/import/json-via-namespace.js
language/module-code/import-assertion-empty.js
language/module-code/import-assertion-key-identifiername.js
language/module-code/import-assertion-key-string-double.js
language/module-code/import-assertion-key-string-single.js
language/module-code/import-assertion-many.js
language/module-code/import-assertion-newlines.js
language/module-code/import-assertion-trlng-comma.js
language/module-code/import-assertion-value-string-double.js
language/module-code/import-assertion-value-string-single.js
🎉 Fixed (5):
language/import/json-invalid.js
language/import/json-named-bindings.js
language/module-code/early-dup-assert-key-export.js
language/module-code/early-dup-assert-key-import-nobinding.js
language/module-code/early-dup-assert-key-import-withbinding.js

jsx/babel

Test result main count This PR count Difference
Total 40 40 0
Passed 37 37 0
Failed 3 3 0
Panics 0 0 0
Coverage 92.50% 92.50% 0.00%

symbols/microsoft

Test result main count This PR count Difference
Total 6093 6093 0
Passed 1783 1783 0
Failed 4310 4310 0
Panics 0 0 0
Coverage 29.26% 29.26% 0.00%

ts/babel

Test result main count This PR count Difference
Total 639 639 0
Passed 568 568 0
Failed 71 71 0
Panics 0 0 0
Coverage 88.89% 88.89% 0.00%

ts/microsoft

Test result main count This PR count Difference
Total 16740 16740 0
Passed 12797 12803 ✅ ⏫ +6
Failed 3943 3937 ✅ ⏬ -6
Panics 0 0 0
Coverage 76.45% 76.48% +0.04%
🎉 Fixed (6):
conformance/importAssertion/importAssertion2.ts
conformance/importAssertion/importAssertion3.ts
conformance/node/nodeModulesImportAssertions.ts
conformance/node/nodeModulesImportModeDeclarationEmit1.ts
conformance/node/nodeModulesImportModeDeclarationEmit2.ts
conformance/node/nodeModulesImportModeDeclarationEmitErrors1.ts

Copy link
Contributor

@Conaclos Conaclos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rome_js_formatter/tests/specs/js/module/import/import-assertions should certainly be renamed to rome_js_formatter/tests/specs/js/module/import/import-attributes

@ematipico ematipico merged commit 0f04d8c into main Apr 11, 2023
@ematipico ematipico deleted the feat/import-assertion-change branch April 11, 2023 08:54
ematipico added a commit that referenced this pull request May 17, 2023
ematipico added a commit that referenced this pull request May 17, 2023
ematipico added a commit that referenced this pull request May 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Formatter Area: formatter A-Parser Area: parser A-Tooling Area: our own build, development, and release tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants